package com.sanpu.kxe.business.card.provider;

import android.content.Context;

import com.sanpu.kxe.business.card.bean.BankInfoOutput;
import com.sanpu.kxe.business.card.model.CardModel;
import com.sanpu.kxe.business.card.view.AddCreditNewActivity;
import com.sanpu.kxe.business.card.view.MyBankListActivity;
import com.sanpu.kxe.utils.IntentTool;
import com.sanpu.kxe.utils.annotation.ModuleAnnotation;

import java.util.List;

import rx.Observable;

/**
 * Description：card模块provider
 * Created by 薛勇军 on 2018/7/23.
 */
@ModuleAnnotation(module = "kxeprovider")
public class CardProvider implements ICardProvider {

    @Override
    public void openMyBankListActivity(Context context) {
        IntentTool.startActivity(context, MyBankListActivity.class);
    }

    @Override
    public void openAddBankSetupActivity(Context context, boolean isFinish) {
        IntentTool.startActivity(context, AddCreditNewActivity.class, isFinish);
    }

    @Override
    public Observable<List<BankInfoOutput>> selectUrmBankPage(String cardType) {
        return CardModel.getInstance().selectUrmBankPage(cardType);
    }
}
